package com.yan;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yan.service.CardLoseService;
/**
 * @author yfz
 */
@SpringBootApplication
@EnableAutoConfiguration
@ImportResource({"classpath:consumer.xml"})
@Controller
public class Main  {
	private static final Logger logger = Logger.getLogger(Main.class);
	@Autowired
	private CardLoseService cardLoseService;
	@RequestMapping("/")
	@ResponseBody
    public String   greeting() {
        return cardLoseService.lose("8888888");
    }
	public static void main(String[] args) throws InterruptedException {
		SpringApplication.run(Main.class, args);
		logger.info("项目启动 ");
	}
}